package wang.hu.bos.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import wang.hu.bos.dao.AreaDao;
import wang.hu.bos.domain.base.Area;
import wang.hu.bos.service.AreaService;

@Service
@Transactional
public class AreaServiceImpl implements AreaService {
	@Autowired
	private AreaDao areaDao;

	@Override
	public void save(Area area) {
		areaDao.save(area);

	}

	@Override
	public void batchSave(List<Area> list) {
		areaDao.save(list);

	}

	@Override
	public Page<Area> pageData(Specification<Area> specification,
			Pageable pageable) {
		return areaDao.findAll(specification, pageable);
	}

}
